package com.iot.ammeter.mapper.web.pay;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.iot.ammeter.dto.web.degree.DegreeDetailDTO;
import com.iot.ammeter.dto.web.pay.BalanceDTO;
import com.iot.ammeter.dto.web.pay.PayDetailDTO;
import com.iot.ammeter.query.web.pay.DegreeQuery;
import com.iot.ammeter.query.web.pay.PayQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: PayMapper
 * @Author: Basil
 * @Date: 2022/1/6 上午9:56
 * @Version: 1.0
 **/
@Mapper
public interface PayMapper extends BaseMapper<PayDetailDTO> {
    /**
     * 查询缴费详情
     *
     * @param pages    翻页对象
     * @param payQuery 查询条件
     * @return 缴费想起集合列表
     */
    IPage<PayDetailDTO> listPayDetail(@Param("pages") Page<PayDetailDTO> pages, @Param("payQuery") PayQuery payQuery);

    /**
     * 保存app用户充值记录
     *
     * @param balanceToDb 充值记录
     * @return int 影响行数
     */
    int saveBalance(@Param("balance") BalanceDTO balanceToDb);

    /**
     * 获取电量详情
     *
     * @param degreeQuery 查询条件
     * @return
     */
    List<DegreeDetailDTO> degreeDetails(@Param("degreeQuery") DegreeQuery degreeQuery);
}
